<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Parse an X509 certificate and return the information as an array</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-x509-free.html">openssl_x509_free</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-x509-read.html">openssl_x509_read</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-x509-parse" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_x509_parse</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">openssl_x509_parse</span> &mdash; <span class="dc-title">Parse an X509 certificate and return the information as an array</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-x509-parse-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>openssl_x509_parse</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$x509cert</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$shortnames</code><span class="initializer"> = true</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_x509_parse()</strong></span> returns information about the
   supplied <em><code class="parameter">x509cert</code></em>, including fields such as subject
   name, issuer name, purposes, valid from and valid to dates etc.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-x509-parse-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">x509cert</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">shortnames</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">shortnames</code></em> controls how the data is indexed in the
       array - if <em><code class="parameter">shortnames</code></em> is <strong><code>TRUE</code></strong> (the default) then
       fields will be indexed with the short name form, otherwise, the long name
       form will be used - e.g.: CN is the shortname form of commonName.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-x509-parse-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <em class="emphasis">The structure of the returned data is (deliberately) not
   yet documented, as it is still subject to change.</em>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-x509-free.html">openssl_x509_free</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-x509-read.html">openssl_x509_read</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
